class Classroom
  include DataMapper::Resource
  storage_names[:default] = "Classroom"
  
  property :id,               Serial
  property :title,            String,        :required => true, :length => 500
  property :course_id,        Integer
  property :start_date,       Date
  property :end_date,         Date
  property :capacity,         Integer,       :required => true
  property :duration,         Integer,       :required => true
  property :time_category_id, Integer,       :required => true
  property :value,            Integer,       :required => true
  property :currency_id,      Integer,       :required => true
  property :address,          String,        :required => true, :length => 500
  property :district,         String,        :length => 500
  property :city_id,          Integer,       :required => true
  property :description,      Text,          :lazy => false
  timestamps :at

  belongs_to :course
  belongs_to :time_category
  belongs_to :currency
  belongs_to :city
  has n, :classroom_details
  has n, :classroom_registrations
end
